import request from '@/config/axios'
import { pa } from 'element-plus/es/locale'

// 农场 VO
export interface FarmWarnApiVO {
  id: number // ID
  name: string // 农场名称
}

// 农场管理 API
export const FarmWarnApi = {
  // 获取农场列表
  getFarmTour: async () => {
    return await request.get({ 
      url: `farm/farm/list-all-simple` 
    })
  },
  // 根据农场来获取农舍
  getFarmHouseApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmhouseListByFarmId`,
      params
    })
  },
  // 告警总览
  getAllWarnApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmDeviceAlarmHistory`,
      params
    })
  },
}
